
import { createApp } from 'vue'
import App from './App.vue'
import routes from './routers/routes'
import {createRouter, createWebHashHistory} from "vue-router"
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElIconList from "@element-plus/icons-vue"

const app = createApp(App)
//路由
const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHashHistory(),
  routes
})

app.use(router)

// element-ui
app.use(ElementPlus)

// element-icon
for (const name in ElIconList) {
  app.component(name, ElIconList[name])
}


// mount要在最后
app.mount('#app')


